import { createModel } from 'hox';
import { useState } from 'react';
interface HoxModelProps {
  windowSize: string;
}
function useHoxModel() {
  const [state, setState] = useState<HoxModelProps>({
    windowSize: 'xl',
  });
  const dispatch = (payload: Partial<HoxModelProps>) => {
    setState((pre) => ({ ...pre, ...payload }));
  };

  return {
    ...state,
    dispatch,
  };
}
export default createModel(useHoxModel);
